package com.mallcai.bigdata.ladon.dpl.mapper.export.provider;

import com.mallcai.bigdata.ladon.dpl.entity.export.ExportTask;
import com.mallcai.bigdata.ladon.dpl.mapper.BaseSqlProvider;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author gst
 * @date 2019-12-30 20:36
 */
public class ExportTaskProvider extends BaseSqlProvider<ExportTask> {

    public static final String TB_EXPORT_TASK = "export_task";

    @Override
    public String getTableName() {
        return TB_EXPORT_TASK;
    }

    @Override
    public Map<String, String> getInsertColumns() {
        Map<String, String> map = new LinkedHashMap<>();
        map.put("download_url", "#{downloadUrl}");
        map.put("err_msg", "#{errMsg}");
        map.put("task_status", "#{taskStatus}");
        return map;
    }

    @Override
    public Map<String, String> getUpdateColumns() {
        Map<String, String> map = new LinkedHashMap<>();
        map.put("downloadUrl", "download_url");
        map.put("errMsg", "err_msg");
        map.put("taskStatus", "task_status");
        return map;
    }

}
